package com.yanqu.road.server.cmd.activity.dafuweng;

import com.yanqu.road.pb.monopoly.CrossMonopolyProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.cross.battle.DaFuWengDataMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C_CROSS_DA_FU_WENG_GET_UNION_REBATE_REWARD,desc = "")
public class CrossUnionRebateCmd extends CrossUnionCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossMonopolyProto.CrossDfwUnionRebateReqMsg reqMsg = CrossMonopolyProto.CrossDfwUnionRebateReqMsg.parseFrom(packet.getBytes());
        int activityId = reqMsg.getActivityId();
        String unionId = reqMsg.getUnionId();
        int times = reqMsg.getTimes();
        long userId = packet.getPlayerId();
        int memberCount = reqMsg.getMemberCount();
        DaFuWengDataMgr.getRebateReward(activityId,serverId,userId,unionId,times,memberCount);
    }

    @Override
    public void sendData() {

    }
}
